//
//  HJHBaseTableViewController.swift
//  Weibo
//
//  Created by 黄健桦 on 2016/9/24.
//  Copyright © 2016年 黄健桦. All rights reserved.
//

import UIKit

class HJHBaseTableViewController: UITableViewController,HJHVisitorLoginViewDelegate {
    
    var userLogin = false
    lazy var visitorView: HJHVisitorLoginView = HJHVisitorLoginView()
    //自定义根视图
    override func loadView() {
        if userLogin {
            //tableView 创建tableView
            super.loadView()
        }
        else {
            view = visitorView
            visitorView.delegate = self
        }
    }
    
    //实现协议方法
    func userWillReigster() {
        print("用户将要注册")
        print("~~~~~~~~~~~~~~~~~~~~~~")
    }
    
    func userWillLogin() {
        print("用户将要登陆")
        print("~~~~~~~~~~~~~~~~~~~~~~")
    }

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }



}
